package com.huangkailong.designpattern.visitor;

import java.util.List;

/**
 * @author huangkl
 * @since 1.0.0
 */
public class BusinessReport {
    private final List<Employee> employeeList;

    public BusinessReport(List<Employee> employeeList) {
        this.employeeList = employeeList;
    }

    /**
     * 访问报表.
     *
     * @param visitor {@link Visitor}
     */
    public void accept(Visitor visitor) {
        for (Employee employee : employeeList) {
            employee.accept(visitor);
        }
    }
}
